--- id: TASK-027 title: 'TUI: Sort process table by memory with m key' status: To Do assignee: [] created_date: '2026-06-12 04:21' labels: - tui - enhancement dependencies: [] priority: low ordinal: 27000 --- ## Description The process table on the System page is always sorted by CPU%. Add a toggle so pressing `m` when on the System page (or when the process table is focused) switches sort between CPU% (default) and RSS memory. Implementation: - Add `_proc_sort: str = "cpu"` to `DashboardApp` (or a `SystemPage` widget if pages are refactored) - Bind `m` scoped to the system page: `action_toggle_proc_sort()` - `_apply_system()` sorts `procs` by the current sort field before adding rows - Process table border title reflects active sort: "Processes [CPU]" or "Processes [Mem]" - `m` key hint visible in the table border or `Footer` ## Acceptance Criteria - [ ] #1 m toggles process table sort between CPU% and RSS memory - [ ] #2 Current sort mode visible in table border title - [ ] #3 Sort persists until toggled again or page changes - [ ] #4 Table re-sorts immediately on keypress without waiting for next sample